home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
cli
/
0utils.lha
/
0Utils
/
CDR.data
< prev
next >
Wrap
Text File
|
1995-09-05
|
2KB
|
84 lines
#ifdef TPLTER
CDR = {
NoParsing;
Version = "1.0";
Short = {{ Remove the first from a list of Words }};
description = {{
Get all but the first word in a list of words.
CAR and CDR build a pair that is in most cases
used together.
}};
Notes = {{
We currently do ignore ReadArgs, so do not expext
"CDR ?" to work.
}};
Template = "/A/F";
Arguments = {{
STRPTR line;
# define CDR 1
}};
History = {{
16-04-95 b_noll created
19-08-95 b_noll created .data file
19-08-95 b_noll (1.1) added newline output to CAR branch
}};
Body = {{
STRPTR sline, rline, line;
line = GetArgStr();
if (line) {
sline = rline = line;
while (*line == ' ') line++;
if (*line && (*line != '\n')) {
UBYTE buffer[MAXLINELEN];
if (*line == '"') {
/* ---- closing quote */
++line;
while (*line && (*line != '"'))
if (*(line++) == '*')
if (*line)
line++;
} else {
/* ---- end of first word */
while (*line && (*line != ' '))
line++;
} /* if */
# if $(@isequal@CDR@$(CMD))
/* ---- Start of next word */
while (*line && (*line == ' '))
line++;
PutStr ((*line) ? line : "\n");
retval = *line ? RETURN_OK : RETURN_WARN;
# else
{
UBYTE ch;
ch = *line;
*line = 0;
PutStr (sline);
PutStr ("\n");
*line = ch;
retval = ch ? RETURN_OK : RETURN_WARN;
}
# endif
} else {
retval = RETURN_ERROR;
SetIoErr(ERROR_REQUIRED_ARG_MISSING);
} /* if */
} /* if */
}};
Addes = {{
#define CDR 1
}};
};
#endif